import * as types from '../type';
import {_http} from '@/axios/http';
import path from '@/axios/path';

const state = {
  tags:[{name:'欢迎',path:'/welcome'},
    {name:'用户详情',path:'/userDetail'},
    {name:'用户资金流水',path:'/userWaterDetail'},
    {name:'扣息记录',path:'/yewu_Charges'},
    {name:'费用配置',path:'/yewu_feeConfig'},
    {name:'用户管理',path:'/userConfig'},
    {name:'方案列表',path:'/fa_list'},
    {name:'申请结算方案',path:'/fa_settle'},
    {name:'即将到期方案',path:'/fa_timer'},
    {name:'充值记录',path:'/cw_recharge'},
    {name:'提现申请',path:'/cw_withdraw'},
    {name:'提现记录',path:'/cw_withdrawRecord'},
    {name:'财务统计',path:'/cw_count'},
    {name:'管理员账号',path:'/xitong_admin'},
    {name:'权限管理',path:'/xitong_access'},
    {name:'角色管理',path:'/xitong_role'},
    {name:'管理员配角色',path:'/xitong_adminRoleDetail'},
    {name:'角色配权限',path:'/xitong_roleAccessDetail'},
    {name:'日志管理',path:'/xitong_log'},
  ]
};
const getters = {

}
const actions = {
  getphotoValidate({commit}, data) {
    return _http(`${path.userPicture}`, data)
      .then((res) => {
        return res
      })
      .catch((err) => {
        return err
      })
  },
  getphoneValidate({commit}, data) {
    return _http(`${path.userPhone}`, data)
      .then(res => {
        return res
      })
      .catch(err => {
        return err
      })
  },
  getuserLogin({commit}, data) {
    return _http(`${path.userLogin}`, data)
      .then(res => {
        return res
      })
      .catch(err => {
        return err
      })
  },
  getmenuSidebar({commit}, data) {
    return _http(`${path.menuSidebar}`, data)
      .then(res => {
        return res
      })
      .catch(err => {
        return err
      })
  }
}
const mutations = {

};
export default {
  state,
  getters,
  mutations,
  actions
}
